//
//  RegisteredViewController.m
//  UI_元旦豆瓣
//
//  Created by dllo on 16/1/3.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "RegisteredViewController.h"

@interface RegisteredViewController ()

@end

@implementation RegisteredViewController

- (void)dealloc{
    [super dealloc];
}

- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        
    }
    return self;
}


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
     self.navigationItem.title = @"注册";
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"注册" style:UIBarButtonItemStylePlain target:self action:@selector(buttonAction)];
    self.navigationItem.rightBarButtonItem = item;
    [item release];
    
    UILabel *nameLable = [[UILabel alloc] initWithFrame:CGRectMake(20, 100, 100, 40)];
    nameLable.backgroundColor = [UIColor clearColor];
    [self.view addSubview:nameLable];
    nameLable.font = [UIFont systemFontOfSize:20];
    nameLable.text = @"用户名:";
    
    UITextField *nameText = [[UITextField alloc] initWithFrame:CGRectMake(150, 100, 200, 40)];
    nameText.backgroundColor = [UIColor clearColor];
    nameText.placeholder = @"请输入用户名";
    [self.view addSubview:nameText];
    nameText.layer.cornerRadius = 10;
    nameText.layer.borderWidth = 1;
    [nameText release];
    
    UILabel *mmLable = [[UILabel alloc] initWithFrame:CGRectMake(20, 170, 100, 40)];
    mmLable.backgroundColor = [UIColor clearColor];
    [self.view addSubview:mmLable];
    mmLable.font = [UIFont systemFontOfSize:20];
    mmLable.text = @"密码:";
    
    UITextField *mmText = [[UITextField alloc] initWithFrame:CGRectMake(150, 170, 200, 40)];
    mmText.backgroundColor = [UIColor clearColor];
    mmText.placeholder = @"请输入密码";
    [self.view addSubview:mmText];
    mmText.layer.cornerRadius = 10;
    mmText.layer.borderWidth = 1;
    [mmText release];

    UILabel *remmLable = [[UILabel alloc] initWithFrame:CGRectMake(20, 230, 100, 40)];
    remmLable.backgroundColor = [UIColor clearColor];
    [self.view addSubview:remmLable];
    remmLable.font = [UIFont systemFontOfSize:20];
    remmLable.text = @"确认密码:";
    
    UITextField *remmText = [[UITextField alloc] initWithFrame:CGRectMake(150, 230, 200, 40)];
    remmText.backgroundColor = [UIColor clearColor];
    remmText.placeholder = @"再次输入密码";
    [self.view addSubview:remmText];
    remmText.layer.cornerRadius = 10;
    remmText.layer.borderWidth = 1;
    [remmText release];

    UILabel *mailLable = [[UILabel alloc] initWithFrame:CGRectMake(20, 300, 100, 40)];
    mailLable.backgroundColor = [UIColor clearColor];
    [self.view addSubview:mailLable];
    mailLable.font = [UIFont systemFontOfSize:20];
    mailLable.text = @"邮箱:";
    
    UITextField *mailText = [[UITextField alloc] initWithFrame:CGRectMake(150, 300, 200, 40)];
    mailText.backgroundColor = [UIColor clearColor];
    mailText.placeholder = @"请输入邮箱";
    [self.view addSubview:mailText];
    mailText.layer.cornerRadius = 10;
    mailText.layer.borderWidth = 1;
    [mailText release];
    
    UILabel *phoneLable = [[UILabel alloc] initWithFrame:CGRectMake(20, 370, 100, 40)];
    phoneLable.backgroundColor = [UIColor clearColor];
    [self.view addSubview:phoneLable];
    phoneLable.font = [UIFont systemFontOfSize:20];
    phoneLable.text = @"联系方式:";
    
    UITextField *phoneText = [[UITextField alloc] initWithFrame:CGRectMake(150, 370, 200, 40)];
    phoneText.backgroundColor = [UIColor clearColor];
    phoneText.placeholder = @"请输入练习方式";
    [self.view addSubview:phoneText];
    phoneText.layer.cornerRadius = 10;
    phoneText.layer.borderWidth = 1;
    [phoneText release];
    
    
    
}

- (void)buttonAction{
    
    [self.navigationController popToViewController:self.navigationController.viewControllers[0] animated:YES];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
